import {
	defineStore
} from "pinia";

export const useStore = defineStore("main", {
	state() {
		return {
			userInfo: {
				share_uid: '',
				merchant_id: '2',
				uid: '',
				vid: '',
				openid: '',
				appid: 'wxd4af2ae9eee998cf',
				tempAppId: '',
				systemInfo: uni.getSystemInfoSync()
			},
			store_id: '',
			locales:'zh',//语言
		};
	},
	unistorage: {
		key: 'main',
		paths: ['token', 'userInfo','locales']
	}, // 开启后对 state 的数据读写都将持久化
});